package org.wu.framework.lazy.orm.database.jpa.repository.core;

public class DefaultLazyJpaEntityMetadata<T,ID,R> implements LazyJpaEntityMetadata<T,ID,R> {



    /**
     * 实体 class
     */
    private final Class<T> entityClass;

    /**
     * 主键ID class
     */
    private final Class<ID> idClass;

    /**
     * repository class
     */
    private final Class<R> repositoryClass;

    public DefaultLazyJpaEntityMetadata(Class<T> entityClass, Class<ID> idClass, Class<R> repositoryClass) {
        this.entityClass = entityClass;
        this.idClass = idClass;
        this.repositoryClass = repositoryClass;
    }


    /**
     * 主键ID class
     */
    @Override
    public Class<ID> getIdClass() {
        return this.idClass;
    }

    /**
     * repository class
     */
    @Override
    public Class<R> getRepositoryClass() {
        return this.repositoryClass;
    }

    /**
     * 获取实体类型
     *
     * @return 返回实体类型
     */
    @Override
    public Class<T> getEntityClass() {
        return this.entityClass;
    }
}
